#pragma once
#ifndef PLAYER_H
#define PLAYER_H

#include "gameobject.h"
#include <QKeyEvent>

class Player : public GameObject
{
public:
    Player(QGraphicsItem *parent = nullptr);
    void update() override;
    void keyPressEvent(QKeyEvent *event) override;

    bool isJumping() const { return jumping; }
    void setJumping(bool jump) { jumping = jump; }

private:
    bool jumping;
    double velocity;
    double gravity;
    double jumpForce;
    int groundLevel;
};

#endif // PLAYER_H
